package com.evolution.warlock.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;


import org.hibernate.search.annotations.Indexed;
import org.hibernate.search.annotations.Similarity;
import org.hibernate.validator.constraints.Length;
import org.wltea.analyzer.lucene.IKSimilarity;

/**
 * Entity - 配置表
 * 
 * @author EVOLUTION Team
 * @version 1.0
 */
@Indexed
@Similarity(impl = IKSimilarity.class)
@Entity
@Table(name = "ev_criminal_base")
@SequenceGenerator(name = "sequenceGenerator", sequenceName = "ev_criminal_base_squence")
public class CriminalBase extends BaseEntity {

	private static final long serialVersionUID = -2021550246973992184L;
	
	private CriminalMember criminalNumber;
	
	/** 刑事犯罪记录号 */
	private RobSteal robSteal; 
	
	/** 行政犯罪记录号 */
	private CivilDispute civilDispute;
    
	/** 涉案类别 :行政*/
	private Integer casePenalty;
	
	/**  行政其它 */
	private String casePenaltyAnother;
	
	/** 涉案类别 :刑事*/
	private Integer caseCriminal;
	
	/**  刑事其它 */
	private String caseCriminalAnother;
	
	/** 是否为流动人口 */
	private String temporaryGuy;
	
	/** 是否暂住登记 */
	private String temporaryRegist; 
	
	/** 未暂住登记的时间段 */
	private String temporaryNoRegistDura; 

	/** 是否有固定住所 */
	private String temporaryFixAd;
	
	/** 是否有固定工作 */
	private String temporaryFixJob;
	
	/** 乘坐何种交通工具来本地 */
	private Integer temporaryTransTools;
	
	/** 乘坐何种交通工具来本地其他 */
	private String temporaryTransToolsAnother;
	
	/** 被抓前在案发所在地区停留时间 */
	private Integer beforeArrestDays;
	
	/** 本地落脚点类型 */
	private Integer localAreaCategory;
	
	/** 本地落脚点类型其它 */
	private String localAreaCategoryAnother;
	
	/** 本地落脚点地区 */
	private String localCriminalArea; 
	
	/** 本地落脚点地址 */
	private String localCriminalAddress;
	
	/** 本地落脚点所属派出所 */
	private Integer localCriminalPoliceName;
	
	/** 作案同伙人数 */
	private Integer ciminalMatesNum;
	
	/** 作案次数 */
	private Integer ciminalNum;

		
	/**
	 * 
	 */	
	@NotNull
	@Length(max = 2)
	@Column(nullable = false)
	public String getTemporaryGuy() {
		return temporaryGuy;
	}
	
	public void setTemporaryGuy(String temporaryGuy) {
		this.temporaryGuy = temporaryGuy;
	}
	
	
	/**
	 * 
	 */	
	@Length(max = 2)
	public String getTemporaryRegist() {
		return temporaryRegist;
	}
	
	public void setTemporaryRegist(String temporaryRegist) {
		this.temporaryRegist = temporaryRegist;
	}
	
	
	
	/**
	 * 
	 */
	@Length(max = 2)
	public String getTemporaryFixAd() {
		return temporaryFixAd;
	}
	
	public void setTemporaryFixAd(String temporaryFixAd) {
		this.temporaryFixAd = temporaryFixAd;
	}
	
	
	/**
	 * 
	 */
	@Length(max = 2)
	public String getTemporaryFixJob() {
		return temporaryFixJob;
	}
	
	public void setTemporaryFixJob(String temporaryFixJob) {
		this.temporaryFixJob = temporaryFixJob;
	}
	
	
	
	/**
	 * 
	 */	
	@Length(max = 2)
	public Integer getCasePenalty() {
		return casePenalty;
	}
	
	public void setCasePenalty(Integer casePenalty) {
		this.casePenalty = casePenalty;
	}
	
	
	/**
	 * 
	 */	
	@Length(max = 2)
	public Integer getCaseCriminal() {
		return caseCriminal;
	}
	
	public void setCaseCriminal(Integer caseCriminal) {
		this.caseCriminal = caseCriminal;
	}

	
	
	/**
	 * 
	 */
	@NotNull
	@Length(max = 2)
	@Column(nullable = false)
	public Integer getBeforeArrestDays() {
		return beforeArrestDays;
	}
	
	public void setBeforeArrestDays(Integer beforeArrestDays) {
		this.beforeArrestDays = beforeArrestDays;
	}
	
	




	@NotNull
	@Length(max = 50)
	@Column(nullable = false, length = 50)
	public String getLocalCriminalArea() {
		return localCriminalArea;
	}

	public void setLocalCriminalArea(String localCriminalArea) {
		this.localCriminalArea = localCriminalArea;
	}

	@NotNull
	@Length(max = 100)
	@Column(nullable = false, length = 100)
	public String getLocalCriminalAddress() {
		return localCriminalAddress;
	}

	public void setLocalCriminalAddress(String localCriminalAddress) {
		this.localCriminalAddress = localCriminalAddress;
	}

    @Length(max = 2)
	public Integer getCiminalMatesNum() {
		return ciminalMatesNum;
	}

	public void setCiminalMatesNum(Integer ciminalMatesNum) {
		this.ciminalMatesNum = ciminalMatesNum;
	}

	@Length(max = 2)
	public Integer getCiminalNum() {
		return ciminalNum;
	}

	public void setCiminalNum(Integer ciminalNum) {
		this.ciminalNum = ciminalNum;
	}

	
	/**
	 * 
	 */
	@Length(max = 2)
	public String getTemporaryNoRegistDura() {
		return temporaryNoRegistDura;
	}

	public void setTemporaryNoRegistDura(String temporaryNoRegistDura) {
		this.temporaryNoRegistDura = temporaryNoRegistDura;
	}

	@Length(max = 2)
	public Integer getTemporaryTransTools() {
		return temporaryTransTools;
	}

	public void setTemporaryTransTools(Integer temporaryTransTools) {
		this.temporaryTransTools = temporaryTransTools;
	}

	@Length(max = 2)
	public Integer getLocalAreaCategory() {
		return localAreaCategory;
	}

	public void setLocalAreaCategory(Integer localAreaCategory) {
		this.localAreaCategory = localAreaCategory;
	}
	
	@OneToOne(mappedBy = "criminalBase", fetch = FetchType.LAZY)
	public RobSteal getRobSteal() {
		return robSteal;
	}

	public void setRobSteal(RobSteal robSteal) {
		this.robSteal = robSteal;
	}


	@OneToOne(mappedBy = "criminalBase", fetch = FetchType.LAZY)
	public CivilDispute getCivilDispute() {
		return civilDispute;
	}

	public void setCivilDispute(CivilDispute civilDispute) {
		this.civilDispute = civilDispute;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(nullable = false, updatable = false)
	public CriminalMember getCriminalNumber() {
		return criminalNumber;
	}

	public void setCriminalNumber(CriminalMember criminalNumber) {
		this.criminalNumber = criminalNumber;
	}

	@Length(max = 100)
	public String getTemporaryTransToolsAnother() {
		return temporaryTransToolsAnother;
	}

	public void setTemporaryTransToolsAnother(String temporaryTransToolsAnother) {
		this.temporaryTransToolsAnother = temporaryTransToolsAnother;
	}

	@Length(max = 50)
	public String getCasePenaltyAnother() {
		return casePenaltyAnother;
	}

	public void setCasePenaltyAnother(String casePenaltyAnother) {
		this.casePenaltyAnother = casePenaltyAnother;
	}

	@Length(max = 50)
	public String getCaseCriminalAnother() {
		return caseCriminalAnother;
	}

	public void setCaseCriminalAnother(String caseCriminalAnother) {
		this.caseCriminalAnother = caseCriminalAnother;
	}

	@NotNull
	@Length(max = 2)
	public Integer getLocalCriminalPoliceName() {
		return localCriminalPoliceName;
	}

	public void setLocalCriminalPoliceName(Integer localCriminalPoliceName) {
		this.localCriminalPoliceName = localCriminalPoliceName;
	}

	@Length(max = 50)
	public String getLocalAreaCategoryAnother() {
		return localAreaCategoryAnother;
	}

	public void setLocalAreaCategoryAnother(String localAreaCategoryAnother) {
		this.localAreaCategoryAnother = localAreaCategoryAnother;
	}

	@Override
	public String toString() {
		return "CriminalBase [criminalNumber=" + criminalNumber + ", robSteal=" + robSteal + ", civilDispute="
				+ civilDispute + ", casePenalty=" + casePenalty + ", casePenaltyAnother=" + casePenaltyAnother
				+ ", caseCriminal=" + caseCriminal + ", caseCriminalAnother=" + caseCriminalAnother + ", temporaryGuy="
				+ temporaryGuy + ", temporaryRegist=" + temporaryRegist + ", temporaryNoRegistDura="
				+ temporaryNoRegistDura + ", temporaryFixAd=" + temporaryFixAd + ", temporaryFixJob=" + temporaryFixJob
				+ ", temporaryTransTools=" + temporaryTransTools + ", temporaryTransToolsAnother="
				+ temporaryTransToolsAnother + ", beforeArrestDays=" + beforeArrestDays + ", localAreaCategory="
				+ localAreaCategory + ", localAreaCategoryAnother=" + localAreaCategoryAnother + ", localCriminalArea="
				+ localCriminalArea + ", localCriminalAddress=" + localCriminalAddress + ", localCriminalPoliceName="
				+ localCriminalPoliceName + ", ciminalMatesNum=" + ciminalMatesNum + ", ciminalNum=" + ciminalNum + "]";
	}
	
	
	
}
